import wechat from '@/script/wechat.js'
const locationStore = {
  state: {
    location: {},
  },

  mutations: {
    SET_LOCATION: (state, obj) => {
      state.location = obj
    },
  },

  actions: {
    // 活动
    setLocation({ commit }) {
			wechat.callLocation((location) => {
				commit('SET_LOCATION', location || {})
			}, (err) => {})
    },
  },
  getters: {
    vuex_locationVO:(state) => state.location
  }
}

export default locationStore
